﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SIGERP_Entidades;
using SIGERP_Negocio;

namespace SIGERP_Presentacion
{
    public partial class frmTipoReclamoActualizar : Form
    {
        private SIGERP_Entidades.TipoReclamo _Instancia;

        public frmTipoReclamoActualizar()
        {
            InitializeComponent();
        }

        public frmTipoReclamoActualizar(SIGERP_Entidades.TipoReclamo tiporeclamo)
        {
            InitializeComponent();
            txtIdTipoReclamo.Text = tiporeclamo.ID.ToString();
            txtTipoReclamo.Text = tiporeclamo.DescTipoReclamo;
        }

        private void frmPaisAgregar_Load(object sender, EventArgs e)
        {

        }

        private void picTitulo_Click(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            TipoReclamo tiporeclamo = new TipoReclamo();
            tiporeclamo.ID = Convert.ToInt32(txtIdTipoReclamo.Text); 
            tiporeclamo.DescTipoReclamo = txtTipoReclamo.Text;
            TiposReclamo.Actualizar(tiporeclamo);
            
            DialogResult = DialogResult.OK;

            Close();
        }

        private void btnCancelar_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
